package com.shiyi.design.decorator;

/**
 * @author wangzhanshuai
 * @date 2021/2/1 9:48 下午
 * @since 1.0
 */
public class MilkDecorator extends Drink{

    private Drink drink;

    public MilkDecorator(Drink drink) {
        this.drink = drink;
    }

    @Override
    public String getDesc() {
        return "牛奶 + " + drink.getDesc();
    }

    @Override
    public int cost() {
        return drink.cost() + 5;
    }
}
